package factorytest.iflytek.com.einkiflytekfactorytest.agingtest;


import android.os.Handler;
import android.os.Message;

import java.lang.ref.WeakReference;

public final class AgingTestItemHandler extends Handler {

    private final WeakReference<AgingTestItemBase> reference;

    public AgingTestItemHandler(AgingTestItemBase item) {
        reference = new WeakReference<>(item);
    }

    @Override
    public void handleMessage(Message msg) {
        AgingTestItemBase item = reference.get();
        if (item == null) {
            return;
        }
        item.handleMessage(msg);
    }
}